#include <iostream>

using namespace std;

int Palin(char word[], int s, int e );

int main( void )
{
	char word[] = "otto";
	char word2[] = "Janne";

	if( Palin(word, 0, sizeof(word)-2) )
	{
		cout << word << " Is a Palindrome" << endl;
	}
	else
	{
		cout << word << " Is NOT a Palindrome" << endl;
	}

	if( Palin(word2, 0, sizeof(word2)-2) )
	{
		cout << word2 << " Is a Palindrome" << endl;
	}
	else
	{
		cout << word2 << " Is NOT a Palindrome" << endl;
	}

	cin.get();
	return 0;
}


int Palin(char word[], int s, int e )
{
	if( s >= e )
		return 1;
	else
	{
		if( word[s] != word[e] )
			return 0;
		else
		{
			return Palin( word, s+1, e-1);
		}
	}
}